﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Prospectus
{
    public static class Engine
    {
        public static int BlockWidth = 16;
        public static int BlockHeight = 16;

        public static Point ConvertVectorToCell(Vector2 position)
        {
            return new Point((int)position.X / BlockWidth, (int)position.Y / BlockHeight);
        }
        public static Rectangle ConvertPointToCell(Point position)
        {
            return new Rectangle(position.X, position.Y, BlockWidth, BlockHeight);
        }
        public static Rectangle ConvertRectangleToCell(Rectangle position)
        {
            return new Rectangle(position.X / BlockWidth, position.Y / BlockHeight, position.Width, position.Height);
        }
        public static Point ConvertCellToPoint(Point position)
        {
            return new Point(position.X * BlockWidth, position.Y * BlockHeight);
        }
    }
}
